import React,{ Component , Fragment} from 'react';
import { Link } from 'react-router-dom'
import itemPic from '../../assets/homeGoods/g-item3.jpg'
export default class FreshFruitsItem extends Component{
    render(){
        let {pic,title,discount,price,size,id} = this.props
        return (
            <Fragment>
                <div className='fresh-item'>
                    <Link to={`details/${id}`} className='fresh-item-pic'>
                        <img src={pic} alt='' />
                    </Link>
                    <h3 className='fruit-title'>{title}</h3>
                    <span className='fruit-discount'>{discount}</span>
                    <p className='fruit-price'>￥{price}<span className='fruit-size'>/{size}</span></p>
                </div>
            </Fragment>
        )
    }
}